package com.itheima.object1;

import java.util.Scanner;

public class SpringTest04 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入字符串");
        String s = sc.nextLine();
        int countAZ=0;
        int countNum=0;
        s = s.toLowerCase();
        char[] chars = s.toCharArray();

        for (int i = 0; i < chars.length; i++) {
            char c = chars[i];
            if (c >= 'a' && c <= 'z') {
                countAZ++;
            }
            if (c >= '1' && c <= '9') {
                countNum++;
            }
        }
        System.out.println("其中字母有:"+countAZ+"个");
        System.out.println("其中数字有:"+countNum+"个");

    }
}
